﻿using System.Windows.Data;
using System;
using System.Globalization;
using System.Windows;

namespace MSAP.Framework.Controls
{
    public class BooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                int boolean = (int)value;
                if (boolean == 1) return true;
            }
            return false;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool boolean = (bool)value;
            if (boolean == true) return 1;
            return 0;
        }
    }
}
